@layout("/layout/header.html"){}
<link rel="stylesheet" href="${ctxPath!}/static/ztree/metro.css" />
	<link rel="stylesheet" href="${ctxPath}/static/validate/css/validform.css" />
	<link rel="stylesheet" href="${ctxPath!}/static/css/custom.css" />
	
		<link rel="stylesheet" href="${ctxPath!}/static/css/font-awesome.min.css" />
		
		<link rel="stylesheet" href="${ctxPath!}/static/chosen/chosen.min.css" />
		
	
		<!--[if lte IE 9]>
			<link rel="stylesheet" href="${ctxPath!}/static/ace/css/ace-part2.min.css" />
		<![endif]-->
		
		<link rel="stylesheet" href="${ctxPath!}/static/css/datepicker.css" /><!-- 日期框 -->
		<link rel="stylesheet" href="${ctxPath!}/static/jquery-tags-input/jquery.tagsinput.css" />

<script src="${ctxPath!}/static/jquery/jquery-2.1.1.min.js"></script>
<script src="${ctxPath!}/static/js/history.js"></script>
	<script type="text/javascript" src="${ctxPath!}/static/layer/layer.js"></script>
	<!-- <script type="text/javascript" src="${ctxPath!}/static/layer/layer.min.js"></script> -->
	<script type="text/javascript" src="${ctxPath!}/static/js/spin.min.js"></script>
	<script type="text/javascript" src="${ctxPath!}/static/ztree/jquery.ztree.all-3.5.min.js"></script>
	<script type="text/javascript" src="${ctxPath!}/static/js/jquery.autosize.min.js"></script>
	<script type="text/javascript" src="${ctxPath!}/static/chosen/chosen.jquery.min.js"></script>
	<script type="text/javascript" src="${ctxPath}/static/validate/Validform_v5.3.2_min.js"></script>
	<script type="text/javascript" src="${ctxPath}/static/js/jquery.form.js"></script>
	<script type="text/javascript" src="${ctxPath}/static/js/bootstrap-contextmenu.js"></script>
	<script type="text/javascript" src="${ctxPath}/static/js/jquery.nicescroll.min.js"></script>
	<script type="text/javascript" src="${ctxPath}/static/js/public.js"></script>
        <!-- 内容区域 -->
        <div class="tpl-content-wrapper">
            <div class="row-content am-cf">
                <div class="row">
                    <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
                        <div class="widget am-cf">
                            <div class="widget-head am-cf">
                                <div class="widget-title am-fl">边框表单</div>
                                <div class="widget-function am-fr">
                                    <a href="javascript:;" class="am-icon-cog"></a>
                                </div>
                            </div>
                            <div class="widget-body am-fr">

                                <form id="role-save" class="am-form tpl-form-border-form tpl-form-border-br" method="post" action="${ctxPath!}/role/save">
                                    <input type="hidden" value="${role.id!}" name="id"/>
                                    <div class="am-form-group">
                                        <label for="nickname" class="am-u-sm-3 am-form-label">角色姓名 <span class="tpl-form-line-small-title">Title</span></label>
                                        <div class="am-u-sm-9">
                                            <input type="text" class="tpl-form-input" name="name" value="${sysrole.name!}" datatype="*"  nullmsg="请输入角色名！"  placeholder="请输入标题文字" >
                                            <small>请填写标题文字10-20字左右。</small>
                                        </div>
                                    </div>
 									<div class="am-form-group">
                                        <label for="nickname" class="am-u-sm-3 am-form-label">角色姓名 <span class="tpl-form-line-small-title">Title</span></label>
                                        <div class="am-u-sm-9">
                                            <#treeselect url="menu/tree" checked="true" isLayer="false" rootNodeName="权限列表"
												class="width-50" treeSelectId="treeSelectResEdit" selectIds="${resIds!}" chkboxType="2">
												<div id="treeSelectResEdit" style="width: 50%;display: inline-block;vertical-align: top;float: left"></div>
											</#treeselect>
											<#treeselect url="office/tree" checked="true" isLayer="false" rootNodeName="机构列表"
												class="width-50" treeSelectId="treeSelectOfficeEdit" selectIds="${officeIds!}"
												chkboxType="1">
												<div id="treeSelectOfficeEdit" style="width: 50%;display: inline-block;vertical-align: top;float: right"></div>
											</#treeselect>
                                        </div>
                                    </div>
     
                                   <#save formId="role-save" config="true" validId="roleEditForm">
										var permission = getCheckbox(treeSelectResEdit);
										var office = getCheckbox(treeSelectOfficeEdit);
										var data = $("#role-save").serialize()+"&resourceIds="+permission.toString()+
													"&officeIds="+office.toString();
										roleEditForm.config({
											 ajaxpost:{data:data}
										});
									</#save>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div>
    </div>
    <script src="${ctxPath}/static/assets/js/amazeui.min.js"></script>
    <script src="${ctxPath}/static/assets/js/amazeui.datatables.min.js"></script>
    <script src="${ctxPath}/static/assets/js/dataTables.responsive.min.js"></script>

<script type="text/javascript" src="${ctxPath!}/static/layer/layer.min.js"></script>
		<script type="text/javascript" src="${ctxPath}/static/validate/Validform_v5.3.2_min.js"></script>

		
</body>

</html>
